<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>商家中心 - Powered By ${systemConfig.systemName}</title>
<meta name="Author" content="webmall Team" />
<meta name="Copyright" content="webmall" />
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<#include "/WEB-INF/template/common/include.ftl">
<link href="${base}/template/shop/css/product_publish.css" rel="stylesheet" type="text/css" />

<link href="${base}/template/admin/css/input.css" rel="stylesheet" type="text/css" />

<script type="text/javascript">
$().ready(function() {

	var $areaSelect = $(".areaSelect");
	// 地区选择菜单
	$areaSelect.lSelect({
		url: "${base}/shop/area!ajaxChildrenArea.action"// AJAX数据获取url
	});
    
    $(".checkClick").click(function(){
    	$this=$(this);
    	if($this[0].value && $this.metadata().isShow)
    	{
    		$("#"+$this.metadata().id).show();
    	}
    	else
    	{
    		$("#"+$this.metadata().id).hide();
    		$("#"+$this.metadata().id).val(0);
    	}
    });
    
	$(".product_color").click(function() {
		$this=$(this);
		if($this.find("input[name='productcolor']").get(0).checked)
		{
			$this.find("input[name='productcolor']").get(0).checked=false;
			deleteCurrentRow($("#"+$this.metadata().id).get(0));
	        $("#productitems .color_"+$this.metadata().id).each(function(){
    			$(this).remove();
	    	});
		}
		else
		{
			$this.find("input[name='productcolor']").get(0).checked=true;
			addColorFile('fileColor',$this.metadata().id,$this.metadata().name);
			addProductitem("productitems");
		}
	});
		
	$(".product_size").click(function() {
		$this=$(this);
		if($this.find("input[name='productsize']").get(0).checked)
		{
			$this.find("input[name='productsize']").get(0).checked=false;
        
	         $("#productitems .size_"+$this.metadata().id).each(function(){
       	 		var firstCols =$("#productitems .color_"+$(this).metadata.color+":first");
            	firstCols.attr("rowspan",firstCols.attr("rowspan")-1);
        		$(this).remove();
		   	 });
		}
		else
		{
			$this.find("input[name='productsize']").get(0).checked=true;
			addProductitem("productitems");
		}
	});
		
	

	
	// 商品图片预览滚动栏
	 try
    {
		$(".productImageArea .scrollable").scrollable({
			speed: 600
		});
    }
    catch(e)
    {
    	alert("trader_center_edit.ftl-->"+e);
    }
	
	// 显示商品图片预览操作层
	$(".productImageArea li").livequery("mouseover", function() {
		$(this).find(".productImageOperate").show();
	});
	
	// 隐藏商品图片预览操作层
	$(".productImageArea li").livequery("mouseout", function() {
		$(this).find(".productImageOperate").hide();
	});
	
	// 商品图片左移
	$(".left").livequery("click", function() {
		var $productImageLi = $(this).parent().parent().parent();
		var $productImagePrevLi = $productImageLi.prev("li");
		if ($productImagePrevLi.length > 0) {
			$productImagePrevLi.insertAfter($productImageLi);
		}
	});
	
	// 商品图片右移
	$(".right").livequery("click", function() {
		var $productImageLi = $(this).parent().parent().parent();
		var $productImageNextLi = $productImageLi.next("li");
		if ($productImageNextLi.length > 0) {
			$productImageNextLi.insertBefore($productImageLi);
		}
	});
	
	// 商品图片删除
	$(".delete").livequery("click", function() {
		var $productImageLi = $(this).parent().parent().parent();
		var $productImagePreview = $productImageLi.find(".productImagePreview");
		var $productImageIds = $productImageLi.find("input[name='productImageIds']");
		var $productImageFiles = $productImageLi.find("input[name='productImages']");
		var $productImageParameterTypes = $productImageLi.find("input[name='productImageParameterTypes']");
		$productImageIds.remove();
		$productImageFiles.after('<input type="file" name="productImages" hidefocus="true" />');
		$productImageFiles.remove();
		$productImageParameterTypes.remove();
		
		$productImagePreview.html("暂无图片");
		$productImagePreview.removeAttr("title");
		if ($.browser.msie) {
			if(window.XMLHttpRequest) {
				$productImagePreview[0].style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod = 'scale', src='')";
			}
		}
	});
	
	// 商品图片选择预览
	var $productImageScrollable = $(".productImageArea .scrollable").scrollable();
	var productImageLiHtml = '<li><div class="productImageBox"><div class="productImagePreview">暂无图片</div><div class="productImageOperate"><a class="left" href="javascript: void(0);" alt="左移" hidefocus="true"></a><a class="right" href="javascript: void(0);" title="右移" hidefocus="true"></a><a class="delete" href="javascript: void(0);" title="删除" hidefocus="true"></a></div><a class="productImageUploadButton" href="javascript: void(0);"><input type="file" name="productImages" hidefocus="true" /><div>上传新图片</div></a></div></li>';
	$(".productImageUploadButton input").livequery("change", function() {
		var $this = $(this);
		var $productImageLi = $this.parent().parent().parent();
		var $productImagePreview = $productImageLi.find(".productImagePreview");
		var fileName = $this.val().substr($this.val().lastIndexOf("\\") + 1);
		if (/(<#list systemConfig.allowedUploadImageExtension?split(stack.findValue("@net.shopxx.bean.SystemConfig@EXTENSION_SEPARATOR")) as list><#if list_has_next>.${list}|<#else>.${list}</#if></#list>)$/i.test($this.val()) == false) {
			$.message("您选择的文件格式错误！");
			return false;
		}
		$productImagePreview.empty();
		$productImagePreview.attr("title", fileName);
		if ($.browser.msie) {
			if(!window.XMLHttpRequest) {
				$productImagePreview.html('<img src="' + $this.val() + '" />');
			} else {
				$this[0].select();
				var imgSrc = document.selection.createRange().text;
				$productImagePreview[0].style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod = 'scale', src='" + imgSrc + "')";
			}
		} else {
			$productImagePreview.html(fileName);
		}
		if ($productImageLi.next().length == 0) {
			$productImageLi.after(productImageLiHtml);
			if ($productImageScrollable.getSize() > 5) {
				$productImageScrollable.next();
			}
		}
		var $productImageIds = $productImageLi.find("input[name='productImageIds']");
		var $productImageParameterTypes = $productImageLi.find("input[name='productImageParameterTypes']");
		var $productImageUploadButton = $productImageLi.find(".productImageUploadButton");
		$productImageIds.remove();
		if ($productImageParameterTypes.length > 0) {
			$productImageParameterTypes.val("productImageFile");
		} else {
			$productImageUploadButton.append('<input type="hidden" name="productImageParameterTypes" value="productImageFile" />');
		}
	});

})

    function  addColorFile(id,color_id,color_name)
    {
    	if($("#"+id+" #"+color_id).length<1)
    	{
	        var trcomp="<tr id='"+color_id+"'><td>"+color_name+"</td><td><input type='hidden' name='descs' value='"+color_id+"' /><input type='hidden' name='colorImageIds' value='"+color_id+"' /><input type='file' name='colorImages'/></td>";
	     	$("#"+id+" tr:last-child").after(trcomp);
     	}
    }
    function  addProductitem(id)
    {
    	var colorArray = $(".product_color :checked");
    	var sizeArray = $(".product_size :checked");
    	for(var i=0; i < colorArray.length; i++)
    	{
    		var colorObj = $('#color_'+colorArray[i].value);
    		for(var j=0; j < sizeArray.length; j++)
    		{
    			var sizeObj = $('#size_'+sizeArray[j].value);
    			if($("#"+id+" #item_"+colorObj.metadata().id+"_"+sizeObj.metadata().id).length < 1 )
		    	{
		    		addProductitemOne(id,colorObj.metadata().id,sizeObj.metadata().id);
		     	}
    		}
    	}
    }
                    
    function  addProductitemOne(id,colorId,sizeId)
    {
    	try{
	    	var colorArray = $(".product_color:checked");
	    	var sizeArray = $(".product_size:checked");
			var firstTR =$("#"+id+" .color_"+colorId+":first");
			var lastTR =$("#"+id+" .color_"+colorId+":last");
	        var colorObj = $('#color_'+colorId);
	        var sizeObj = $('#size_'+sizeId);
			var firstCols =$("#"+id+" .color_"+colorId+":first td:first");
            firstCols.attr("rowspan",firstCols.attr("rowspan")+1);
    		if($("#"+id+" tr.color_"+colorId).length < 1 )
    		{
	    		var addedColumn = "<td rowspan='" +sizeArray.length+"'>"+colorObj.metadata().name+"</td>";
		        var trcomp="<tr id='item_"+colorObj.metadata().id+"_"+sizeObj.metadata().id+"' class='addedrows color_"+colorId+" size_"+sizeId+"'>"+addedColumn+"<td>"+sizeObj.metadata().lable+"</td><td><input type='hidden' name='itemIds' value='' /><input type='hidden' name='colorIds' value='"+colorObj.metadata().id+"' /><input type='hidden' name='sizeIds' value='"+sizeObj.metadata().id+"' /><input type='text' name='productitemPrice' value='' style='size:12;' /></td><td><input type='text' name='productitemCount' value='' style='size:12;' /></td><td><input type='text' name='productitemSn' value='' style='size:12;' /></td></tr>";
		     	$("#"+id+" tr:last-child").after(trcomp);
    		}
            else
            {
		        var trcomp="<tr id='item_"+colorObj.metadata().id+"_"+sizeObj.metadata().id+"' class='addedrows color_"+colorId+" size_"+sizeId+"'><td>"+sizeObj.metadata().lable+"</td><td><input type='hidden' name='itemIds' value='' /><input type='hidden' name='colorIds' value='"+colorObj.metadata().id+"' /><input type='hidden' name='sizeIds' value='"+sizeObj.metadata().id+"' /><input type='text' name='productitemPrice' value='' style='size:12;' /></td><td><input type='text' name='productitemCount' value='' style='size:12;' /></td><td><input type='text' name='productitemSn' value='' style='size:12;' /></td></tr>";
		     	lastTR.after(trcomp);
    		}
        }
        catch(e)
        {
        	alert(e);
        }
    }
    
    function  deleteCurrentRow(tr){
    	if(tr == null)
    	{ 
    		return;
    	}
		var tbody=tr.parentNode;  
		tbody.removeChild(tr);  
    }
</script>
<#if !id??>
	<#assign isAdd = true />
<#else>
	<#assign isEdit = true />
</#if>
</head>
<body class="product_publish">
	<#include "/WEB-INF/template/shop/header.ftl">
	<div class="body memberCenterIndex">
		<div class="bodyRight" style="width:100%;">
			<div class="memberCenterDetail"  style="width:100%;">
				<div class="title_top" style="width:960px;">
					<#if isAdd??>发布商品<#else>编辑商品</#if>
				</div>
				<div class="middle">
					<div class="blank"></div>
					<form id="inputForm" class="validate" action="trader_center!update.action" method="post" enctype="multipart/form-data" >
						<input type="hidden" name="id" value="${id}" />
						<input type="hidden" name="product.productCategory.id" value="${product.productCategory.id}" />
						<input type="hidden" name="product.flagshipStore.id" value="${(product.flagshipStore.id)!}" />
                        <input type="hidden" name="product.productSn" value="${(product.productSn)!}" />
                        <input type="hidden" name="product.isMarketable" value="${(product.isMarketable)!}" />
						<ul class="tab">
							<li>
								<input type="button" value="商品基本信息" hidefocus="true" />
							</li>
							<li>
								<input type="button" value="上传图片" hidefocus="true" />
							</li>
							<li>
								<input type="button" value="商品销售属性" hidefocus="true" />
							</li>
							<li>
								<input type="button" value="商品属性" hidefocus="true" />
							</li>
							<li>
								<input type="button" value="商品描述" hidefocus="true" />
							</li>
							<li>
								<input type="button" value="包装清单" hidefocus="true" />
							</li>
							<li>
								<input type="button" value="售后服务" hidefocus="true" />
							</li>
							<li>
								<input type="button" value="物流信息" hidefocus="true" />
							</li>
						</ul>
						<table class="inputTable tabContent">
							<tr>
								<th>
									商品名称:
								</th>
								<td>
									<input type="text" name="product.name" class="formText {required: true}" value="${(product.name)!}" />
									<label class="requireField">*</label>
								</td>
							</tr>
							<tr>
								<th>
									商品品牌:
								</th>
								<td>
									<select name="product.brand.id">
										<option value="">请选择...</option>
										<#list allBrand as list>
											<option value="${list.id}"<#if (list.id == product.brand.id)!> selected </#if>>
												${list.name}
											</option>
										</#list>
									</select>
								</td>
							</tr>
							<tr>
								<th>
									本店售价:
								</th>
								<td>
									<input type="text" name="product.price" class="formText {required: true, min: 0}" value="${(product.price)!"0"}" />
									<label class="requireField">*</label>
								</td>
							</tr>
							<tr>
								<th>
									市场售价:
								</th>
								<td>
									<input type="text" name="product.marketPrice" class="formText {required: true, min: 0}" value="${(product.marketPrice)!"0"}" />
									<label class="requireField">*</label>
								</td>
							</tr>
							<#if systemConfig.pointType == "productSet">
								<tr>
									<th>
										积分:
									</th>
									<td>
										<input type="text" name="product.point" class="formText {required: true, digits: true}" value="${(product.point)!"0"}" />
									</td>
								</tr>
							</#if>
							<tr>
								<th>
									商品重量:
								</th>
								<td>
									<input type="text" name="product.weight" class="formText {required: true, min: 0, messagePosition: '#weightMessagePosition'}" value="${(product.weight)!"0"}" title="0表示不计重量" />
									<select name="product.weightUnit">
										<#list allWeightUnit as list>
											<option value="${list}"<#if (list == product.weightUnit)!> selected </#if>>
												${action.getText("WeightUnit." + list)}
											</option>
										</#list>
									</select>
									<span id="weightMessagePosition"></span>
									<label class="requireField">*</label>
								</td>
							</tr>
							<tr>
								<th>
									库存量:
								</th>
								<td>
									<input type="text" name="product.store" class="formText {digits: true}" value="${(product.store)!}" title="只允许输入零或正整数，为空表示不计库存" />				 						
								</td>
							</tr>
							<tr>
								<th>
									是否精品推荐:
								</th>
								<td>
									<label><input type="radio" name="product.isBest" value="true"<#if (product.isBest == true)!> checked</#if> />是</label>
									<label><input type="radio" name="product.isBest" value="false"<#if (isAdd || product.isBest == false)!> checked</#if> />否</label>
								</td>
							</tr>
							<tr>
								<th>
									是否新品推荐:
								</th>
								<td>
									<label><input type="radio" name="product.isNew" value="true"<#if (product.isNew == true)!> checked</#if> />是</label>
									<label><input type="radio" name="product.isNew" value="false"<#if (isAdd || product.isNew == false)!> checked</#if> />否</label>
								</td>
							</tr>
							<tr>
								<th>
									是否热销推荐:
								</th>
								<td>
									<label><input type="radio" name="product.isHot" value="true"<#if (product.isHot == true)!> checked</#if> />是</label>
									<label><input type="radio" name="product.isHot" value="false"<#if (isAdd || product.isHot == false)!> checked</#if> />否</label>
								</td>
							</tr>
                            <tr>
								<th>
									是否特价:
								</th>
								<td>
									<label><input type="radio" name="product.isSpecPrice" class="checkClick {id:'specPrice',isShow:true}" value="true"<#if (product.isSpecPrice == true)!> checked</#if> />是</label>
									<label><input type="radio" name="product.isSpecPrice" class="checkClick {id:'specPrice',isShow:false}" value="false"<#if (isAdd || product.isHot == false)!> checked</#if> />否</label>
									<input type="text" id="specPrice" name="product.specPrice"  style="<#if (product.isSpecPrice == false)!> display:none;</#if>" class="formText {required: true, digits: true}" value="${(product.specPrice)!"0"}" />
								</td>
							</tr>
							<tr>
								<th>
									页面关键词:
								</th>
								<td>
									<input type="text" name="product.metaKeywords" class="formText" value="${(product.metaKeywords)!}" />
								</td>
							</tr>
							<tr>
								<th>
									页面描述:
								</th>
								<td>
									<textarea name="product.metaDescription" class="formTextarea">${(product.metaDescription)!}</textarea>
								</td>
							</tr>
						</table>
						<table class="inputTable tabContent">
							<tr>
								<th>
									上传商品图片
								</th>
								<td>
									<div class="productImageArea">
										<div class="example"></div>
										<a class="prev browse" href="javascript:void(0);" hidefocus="true"></a>
										<div class="scrollable">
											<ul class="items">
												<#list (product.productImageList)! as list>
													<li>
														<div class="productImageBox">
															<div class="productImagePreview png">
																<img src="${base}${list.thumbnailProductImagePath}" >
															</div>
															<div class="productImageOperate">
																<a class="left" href="javascript: void(0);" alt="左移" hidefocus="true"></a>
																<a class="right" href="javascript: void(0);" title="右移" hidefocus="true"></a>
																<a class="delete" href="javascript: void(0);" title="删除" hidefocus="true"></a>
															</div>
															<a class="productImageUploadButton" href="javascript: void(0);">
																<input type="hidden" name="productImageIds" value="${list.id}" />
																<input type="hidden" name="productImageParameterTypes" value="productImageId" />
																<#if systemConfig.allowedUploadImageExtension != "">
																	<input type="file" name="productImages" hidefocus="true" />
																	<div>上传新图片</div>
																<#else>
																	<div>不允许上传</div>
																</#if>
															</a>
														</div>
													</li>
												</#list>
												<li>
													<div class="productImageBox">
														<div class="productImagePreview png">暂无图片</div>
														<div class="productImageOperate">
															<a class="left" href="javascript: void(0);" alt="左移" hidefocus="true"></a>
															<a class="right" href="javascript: void(0);" title="右移" hidefocus="true"></a>
															<a class="delete" href="javascript: void(0);" title="删除" hidefocus="true"></a>
														</div>
														<a class="productImageUploadButton" href="javascript: void(0);">
															<#if systemConfig.allowedUploadImageExtension != "">
																<input type="file" name="productImages" hidefocus="true" />
																<div>上传新图片</div>
															<#else>
																<div>不允许上传</div>
															</#if>
														</a>
													</div>
												</li>
											</ul>
										</div>
										<a class="next browse" href="javascript:void(0);" hidefocus="true"></a>
										<div class="blank"></div>
									</div>
								</td>
							</tr>
							<tr>
								<th></th>
								<td>
									<#if systemConfig.allowedUploadImageExtension != "">
										<span class="warnInfo"><span class="icon">&nbsp;</span><#if (systemConfig.uploadLimit) != 0 && (systemConfig.uploadLimit < 1024)>小于${systemConfig.uploadLimit}KB<#elseif (systemConfig.uploadLimit >= 1024)>小于${systemConfig.uploadLimit / 1024}MB</#if> (<#list systemConfig.allowedUploadImageExtension?split(stack.findValue("@net.shopxx.bean.SystemConfig@EXTENSION_SEPARATOR")) as list><#if list_has_next>*.${list};<#else>*.${list}</#if></#list>)</span>
									<#else>
										<span class="warnInfo"><span class="icon">&nbsp;</span>系统设置不允许上传图片文件!</span>
									</#if>
								</td>
							</tr>
							<tr>
								<th>颜色</th>
								<td>
									<#list allColor as list>
									<div style="width:100px;float:left;" class="product_color {id:'${list.id}',name:'${list.name}'}">
										<input id="color_${list.id}" type="checkbox" name="productcolor" <#if colors.contains(list.id) > checked </#if> value="${list.id}" class="color_ckb {id:'${list.id}',name:'${list.name}'}" onclick="return false;" /> <div style="width:8px;height:8px;padding:6px;background-color:${list.logo};float:left;">&nbsp;</div>&nbsp;${list.name}
									</div>
									</#list>
								</td>
							</tr>
							<tr>
								<th></th>
								<td>
									<table id="fileColor" class="inputTable">
										<tr>
										    <td>颜色名称</td>
										    <td>图片</td>
										</tr>
                                        <#list (product.productColorList)! as list>
                                        <tr id='${list.color.id}'>
                                            <td>${list.color.name}</td>
                                            <td>
                                                <img src="${base}${list.imgUrl}" width=60 height=60 />
                                                <input type='hidden' name='descs' value='${list.color.id}' />
                                        		<input type='hidden' name='colorImageIds' value='${list.color.id}' />
                                                <input type='file' name='colorImages' />
                                            </td>
                                        </tr>
									   </#list>
									</table>
								</td>
							</tr>
							<tr>
								<th>尺寸</th>
								<td>
									<#list (productCategory.productSize.propertiesValueList)! as list>
									<div style="width:100px;float:left;" class="product_size {id:'${list.id}',name:'${list.lable}'}">
										<input id="size_${list.id}" type="checkbox" name="productsize" <#if sizes.contains(list.id) > checked </#if> value="${list.id}" class="size_ckb {id:'${list.id}',lable:'${list.lable}'}"  onclick="return false;"  /> 
                                        &nbsp;&nbsp;${list.lable}
									</div>
									</#list>
								</td>
							</tr>
							<tr>
								<th></th>
								<td>
									<table id="productitems" class="inputTable">
										<tr>
										    <td>颜色</td>
										    <td>尺码</td>
										    <td>价格*</td>
										    <td>数量*</td>
										    <td>商家编码*</td>
										</tr>
                                        <#list (product.productitemSet)! as pitem>
                                              <tr id='item_${(pitem.color.id)!}_${(pitem.propertiesValue.id)!}' class='addedrows color_${(pitem.color.id)!} size_${(pitem.propertiesValue.id)!} {color:"${(pitem.color.id)!}"}'>
                                                  <#if (pitem_index%sizes?size==0)>
                                                  <td rowspan="${sizes?size}">${(pitem.color.name)!}</td>
                                                  </#if>
                                                  <td>${(pitem.propertiesValue.lable)!}</td>
                                                  <td><input type='hidden' name='itemIds' value='${(pitem.id)!}' />
                                                      <input type='hidden' name='colorIds' value='${(pitem.color.id)!}' />
                                                      <input type='hidden' name='sizeIds' value='${(pitem.propertiesValue.id)!}' />
                                                      <input type='text' name='productitemPrice' value='${pitem.price}' style='size:12;' />
                                                  </td>
                                                  <td><input type='text' name='productitemCount' value='${pitem.store}' style='size:12;' /></td>
                                                  <td><input type='text' name='productitemSn' value='${pitem.itemSn}' style='size:12;' /></td>
											</tr>
										</#list>
									</table>
								</td>
							</tr> 
						</table>
						<table class="inputTable tabContent">
							<#list (product.productPropertiesList)! as productProperties>
								<tr>
									<td align="right" width="40%" style="text-align:right;">
									<input type="hidden" name="propertiesIds" value="${productProperties.id}" />
									<input type="text" name="propertiesLables" value="${productProperties.lable}" style="size:20;" />
									</td>
									<td>
										<select name="propertiesValues">
										<#list productProperties.properties.propertiesValueList as list>
											<option value="${list.value}" <#if (list.value == productProperties.value)!> selected </#if>>
												${list.lable}
											</option>
										</#list>
										</select>
									</td>
								</tr>
							</#list>
						</table>
						<table class="inputTable tabContent">
							<tr>
								<td colspan="2">
									<textarea name="product.attributes" class="wysiwyg" style="width: 100%; height: 450px;">${(product.attributes)!}</textarea>
								</td>
							</tr>
						</table>
						<table class="inputTable tabContent">
							<tr>
								<td colspan="2">
									<textarea name="product.description" class="wysiwyg" style="width: 100%; height: 450px;">${(product.description)!}</textarea>
								</td>
							</tr>
						</table>
						<table class="inputTable tabContent">
							<tr>
								<td colspan="2">
									<textarea name="product.packList" class="wysiwyg" style="width: 100%; height: 450px;">${(product.packList)!}</textarea>
								</td>
							</tr>
						</table>
						<table class="inputTable tabContent">
							<tr>
								<td colspan="2">
									<textarea name="product.afterService" class="wysiwyg" style="width: 100%; height: 450px;">${(product.afterService)!}</textarea>
								</td>
							</tr>
						</table>
						<table class="inputTable tabContent">
							<tr>
								<th>
									所在地: 
								</th>
								<td>
                                    <input type="text" name="product.area.id" class="areaSelect hidden {required: true, messages: {required: '请选择地区！'}, messagePosition: '#addressMessagePosition'}" value="${(product.area.path)!}" />
									<span id="addressMessagePosition"></span>
									<label class="requireField">*</label>
								</td>
							</tr>
							<tr>
								<th>
									运费:
								</th>
								<td>
                                     <input type="radio" class="{required: true}" <#if product.isShippFree >checked</#if>  value="true" name="product.isShippFree" />卖家承担运费
                                     <br/>
                                     <input type="radio" class="{required: true}"  <#if !(product.isShippFree) >checked</#if>  value="false" name="product.isShippFree" />买家承担运费
                                    		平邮<input type="text" name="product.postFee" class="formText {required: true, min: 0}" value="${(product.postFee)!}" style="width:60px;" />
                                         	快递<input type="text" name="product.expressFee" class="formText {required: true, min: 0}" value="${(product.expressFee)!}" style="width:60px;" />
                                         	EMS<input type="text" name="product.emsFee" class="formText {required: true, min: 0}" value="${(product.emsFee)!}" style="width:60px;" />
								</td>
							</tr>
						</table>
						<div class="buttonArea">
							<input type="submit" class="formButton" value="确  定" hidefocus="true" />&nbsp;&nbsp;&nbsp;&nbsp;
							<input type="button" class="formButton" onclick="window.history.back(); return false;" value="返  回" hidefocus="true" />
						</div>
					</form>
				</div>
				<div class="bottom">
				</div>			
			</div>
			
		</div>
		
		<div class="blank"></div>
		<#include "/WEB-INF/template/shop/friend_link.ftl">
	</div>
	<div class="blank"></div>
	<#include "/WEB-INF/template/shop/footer.ftl">
</body>
</html>
